import { db } from '@/db'
import { categories } from '@/db/schema'

const categoriesNames = [
  'Java',
  'Python',
  'JavaScript',
  'TypeScript',
  'React',
  'Next.js',
  'Node.js',
  'Express',
  'MongoDB',
  'PostgreSQL',
  'MySQL',
  'Docker',
  'Kubernetes',
  'AWS',
  'GCP',
  'Azure',
  'CI/CD',
  'Testing',
  'DevOps'
]

async function main() {
  try {
    const values = categoriesNames.map(name => ({
      name,
      description: `Videos related to ${name.toLowerCase()}`
    }))
    await db.insert(categories).values(values)
    console.log('Categories seeded successfully')
  } catch (error) {
    console.error('Error seeding categories:', error)
    process.exit(1)
  }
}

main()
